﻿<phone:PhoneApplicationPage
    x:Class="JustinAngel.MindwaveSensor.WP8.TestApp.TelerikGagues"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
	xmlns:gauges="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.DataVisualization"

    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True">
	<phone:PhoneApplicationPage.Resources>
		<DataTemplate x:Key="EmptyTickTemplate">
			<Grid/>
		</DataTemplate>
		<DataTemplate x:Key="MarkerTemplate">
			<Grid>
				<Ellipse Fill="#FF9BFF89" HorizontalAlignment="Left" Stroke="Black" VerticalAlignment="Top" Margin="8,-38,-34,0" Height="27" RenderTransformOrigin="0.5,0.5" Width="26" StrokeThickness="0">
					<Ellipse.RenderTransform>
						<CompositeTransform ScaleY="-1"/>
					</Ellipse.RenderTransform>
				</Ellipse>
			</Grid>
		</DataTemplate>
	</phone:PhoneApplicationPage.Resources>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel Grid.Row="0" Margin="12,17,0,28">
            <TextBlock Text="JustinAngel.Mindwave.WP8" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="eSense gauge" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
        	<Grid Margin="-10,10,10,202">
        		<gauges:RadialGaugeRange x:Name="gaugeAttention" 
        			MaxValue="100"
					MinValue="0"
        			LabelStep="10"
        			TickStep="10" TickTemplate="{StaticResource EmptyTickTemplate}"
					
                         >
        			<gauges:SegmentedRadialGaugeIndicator Value="0" IsAnimated="True" AnimationDuration="0:0:0.5" >
        				<gauges:SegmentedRadialGaugeIndicator.AnimationEasing>
        					<SineEase EasingMode="EaseIn"/>
        				</gauges:SegmentedRadialGaugeIndicator.AnimationEasing>
        				<gauges:BarIndicatorSegment  Stroke="Blue" Length="70" RenderTransformOrigin="0.2,0" Thickness="5" />
        				<gauges:BarIndicatorSegment  Length="30" Stroke="Green" Thickness="5" />
        			</gauges:SegmentedRadialGaugeIndicator>
					<gauges:MarkerGaugeIndicator Value="70" Margin="14,-50,0,1" MarkerTemplate="{StaticResource MarkerTemplate}" />
        		</gauges:RadialGaugeRange>
        		<TextBlock HorizontalAlignment="Left" Height="68" Margin="94,55,0,0" Style="{StaticResource PhoneTextExtraLargeStyle}" TextWrapping="Wrap" Text="Awareness:" VerticalAlignment="Top" Width="214"/>
        		<TextBlock x:Name="txtIsAware" HorizontalAlignment="Left" Height="68" Margin="308,55,0,0" Style="{StaticResource PhoneTextExtraLargeStyle}" TextWrapping="Wrap" VerticalAlignment="Top" Width="80"/>
        		<TextBlock HorizontalAlignment="Left" Height="111" Margin="94,112,0,0" Style="{StaticResource PhoneTextNormalStyle}" TextWrapping="Wrap" VerticalAlignment="Top" Width="294">
        			<Run Text="* Hold a single thought"/>
        			<LineBreak/>
        			<Run Text="* Count back from 100"/>
        			<LineBreak/>
        			<Run Text="* Sing a song silently"/>
        			<LineBreak/>
        			<Run Text="* Stare at a specific object"/>
        		</TextBlock>

        	</Grid>
        	<Grid Margin="-10,312,10,-100">
        		<gauges:RadialGaugeRange x:Name="gaugeMeditation" 
        			MaxValue="100"
        			LabelStep="10"
        			TickStep="10" TickTemplate="{StaticResource EmptyTickTemplate}"
					
                         >
        			<gauges:SegmentedRadialGaugeIndicator Value="0" IsAnimated="True" AnimationDuration="00:0:0.8" >
        				<gauges:SegmentedRadialGaugeIndicator.AnimationEasing>
        					<SineEase EasingMode="EaseIn"/>
        				</gauges:SegmentedRadialGaugeIndicator.AnimationEasing>
        				<gauges:BarIndicatorSegment  Stroke="Blue" Length="70" RenderTransformOrigin="0.2,0" Thickness="5" />
        				<gauges:BarIndicatorSegment  Length="30" Stroke="Green" Thickness="5" />
        			</gauges:SegmentedRadialGaugeIndicator>
        			<gauges:MarkerGaugeIndicator Value="70" MarkerTemplate="{StaticResource MarkerTemplate}" Margin="11,-52,0,0" />
        		</gauges:RadialGaugeRange>
        		<TextBlock HorizontalAlignment="Left" Height="68" Margin="94,55,0,0" Style="{StaticResource PhoneTextExtraLargeStyle}" TextWrapping="Wrap" Text="Meditation:" VerticalAlignment="Top" Width="214"/>
        		<TextBlock x:Name="txtIsMeditative" HorizontalAlignment="Left" Height="68" Margin="308,55,0,0" Style="{StaticResource PhoneTextExtraLargeStyle}" TextWrapping="Wrap" VerticalAlignment="Top" Width="80"/>
        		<TextBlock HorizontalAlignment="Left" Height="111" Margin="94,112,0,0" Style="{StaticResource PhoneTextNormalStyle}" TextWrapping="Wrap" VerticalAlignment="Top" Width="294">
        			<Run Text="* Relax"/>
        			<LineBreak/>
        			<Run Text="* Close your eyes"/>
        			<LineBreak/>
        			<Run Text="* Deep breaths and slowly exhale"/>
        			<LineBreak/>
        			<Run Text="* Clear your mind of thoughts"/>
        		</TextBlock>

        	</Grid>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>